<template>
    <div>
        <div class="member-tab border-top dlIndex">
            <div class="tab">
                <div class="tab-head">
                    <ul class="tab-nav nav2">
                        <li v-for="(value, key) in menus.list" :class="{active: key == menus.checked }"
                            @click="changeMenu(key)">
                            <router-link id="tab-class01lia" :to="{name:'DlSeller',params: { state: value.state }}"
                                         replace>
                                {{value.name}}
                            </router-link>
                        </li>
                    </ul>
                </div>

                <div class="tab-body">
                    <!-- 交易中的商品 -->
                    <div class="tab-panel border-top2  active" id="tab-class01">
                        <mt-loadmore :bottom-all-loaded="allLoaded" ref="loadmore" id="boxs"
                                     v-infinite-scroll="loadMore" infinite-scroll-disabled="busy"
                                     infinite-scroll-distance="10">
                            <div class="list-empty" v-if="hideOrder">
                                <p><img src="~images/gamelogo.png"></p>
                                <span>您还没有订单</span>
                            </div>
                            <p id="coins_id" v-if="showCoins">
                                <img src="~images/coins/loading-sm.gif">
                                <span>请等待。。。</span>
                            </p>
                            <div v-if="$route.params.state=='publish'">
                                <div v-for="item in Dashoulist" class="pro-col border-bottom2">
                                    <div @click="changeMsg(item)">
                                        <a class="shareopen">
                                            <div class="pro-list border-top border-top">
                                                <div class="pro-pic">
                                                    <img :src="item.picture">
                                                    <div :class="item.orderType==5?'pro-cata5':'pro-cata4'">
                                                        {{item.orderType == 5 ? '陪' : '代'}}
                                                    </div>
                                                </div>
                                                <div class="pro-title">
                                                    <p class="catagory">
                                                        {{item.gameName}}/{{item.regionName}}/{{item.serverName}}</p>
                                                    <p class="title"
                                                       style="white-space: nowrap; text-overflow: ellipsis;overflow: hidden;">
                                                        {{item.levelingNeeds == 'elevateRank' ? '升段位' : (item.levelingNeeds
                                                        == 'elevateGrade' ? '升等级' : '')}} {{item.currentLevelStr}}-
                                                        {{item.targetLevelStr}} {{item.levelComboDay}}天完成</p>
                                                    <p class="price">
                                                        ￥{{item.levelComboPrice}}
                                                        <span data-id="138" class="buyer-operation"></span>
                                                    </p>
                                                </div>
                                            </div>
                                        </a>
                                    </div>
                                    <div v-if="item.levelingStatus==1" class="pro-list2 border-bottom">
                                        <span class="buyer-status">发布成功，10分钟内开始给您代练</span>
                                    </div>
                                    <div v-else-if="item.levelingStatus==2" class="pro-list2 border-bottom">
                                        <router-link
                                                :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                            <div class="pro-list2 border-bottom"
                                                 v-if="item.unreadNum!=null&&item.unreadNum!=0">
                                <span class="buyer-status5">
                                  您有{{item.unreadNum}}条新信息
                                </span>
                                                <span class="buyer-chat">聊天</span>
                                            </div>
                                            <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              代练中</span>
                                                <!--<span class="buyer-chat">聊天</span>-->
                                            </div>
                                        </router-link>
                                        <div class="pro-list2b border-bottom">
                                            <div class="caozuo fw f30">
                                                <a class="ared"
                                                   @click="confirm(item)">确认完成，给大神打款</a>
                                                <router-link :to="{name:'DlBuyerAppeal',query:{orderNum:item.orderNum || item.mainOrderNum,type:1,mainOrderNum:item.mainOrderNum ? true :false}}"
                                                             class="awhite">
                                                    我要申诉
                                                </router-link>
                                            </div>

                                        </div>
                                    </div>
                                    <div v-else>
                                        <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">代练完成</span>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--代练中的-->
                            <div v-else-if="$route.params.state=='process'">
                                <div v-for="item in Dashoulist" class="pro-col border-bottom2">
                                    <div><a class="shareopen">
                                        <div class="pro-list border-top border-top">
                                            <div class="pro-pic">
                                                <img :src="item.orderImg || defaultImg" :onerror="errorImg01">
                                                <div :class="item.orderType==4 || item.mainOrderNum?'pro-cata4':(item.orderType==5?'pro-cata5':'pro-cata2')">
                                                    {{item.orderType == 4 || item.mainOrderNum ? '代' :(item.orderType == 5? '陪':'店')}}

                                                </div>
                                            </div>
                                            <div class="pro-title">
                                                <p class="catagory">
                                                    {{item.gameName}}/{{item.regionName}}/{{item.serverName}}</p>
                                                    <p class="title" v-if="item.mainOrderNum"> {{item.levelingCombo}}</p>
                                                    <p class="title" v-else-if="item.storeOrder">{{item.levelingCombo}}</p>
                                                    <p class="title" v-else-if="item.orderType == 5">
                                                        {{item.roleName}} {{item.playerLevel}} 陪练{{item.completeSparringSessions}}场
                                                    </p>
                                                <p class="title" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" v-else>
                                                    {{item.comboType == 'elevateRank' ? '升段位' : (item.comboType ==
                                                    'elevateGrade' ? '升等级' : '')}} {{item.currentLevel}}-{{item.targetLevel}} {{item.levelComboDay
                                                    }}天完成</p>
                                                <p class="price">
                                                    ￥{{item.totalAmount}}
                                                </p>
                                            </div>
                                        </div>
                                    </a>
                                    </div>
                                    <div v-if='item.mainOrderNum'>
                                        <router-link :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum ? item.orderNum : item.mainOrderNum,type:item.orderType || item.mainOrderNum?1:3,mainOrderNum:item.mainOrderNum ? true : false}}">
                                                <div class="pro-list2 border-bottom">
                                                    <span class="buyer-status5" v-if='item.orderStatus==1'>未付款</span>
                                                    <span class="buyer-status5" v-else-if='item.orderStatus==2'>已付款，代练中</span>
                                                     <span class="buyer-status5" v-else-if='item.orderStatus==6'>问题处理中，客服介入</span>
                                                     <span class="buyer-status5" v-else-if='item.orderStatus==3'>代练完成</span>
                                                     <span class="buyer-status5" v-else-if='item.orderStatus==23'>等待结算</span>
                                                     <span class="buyer-status5" v-else>已结算</span>
                                                     <span data-v-d58217ac="" class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>   
                                    </div>
                                    <div v-else-if="item.storeOrder">
                                        <div v-if="item.orderStatus==storeOrderStatus.WAIT_PAID">
                                            <div class="pro-list2 border-bottom"><span class="buyer-status5">待付款</span>
                                                <em class="buyer-btn-zf">
                                                    <!-- <a @click="nextOrder(item.id)">去付款</a> -->
                                                    <a :href="'/store/pay.html?orderId='+item.id">去付款</a>
                                                </em>
                                            </div>
                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.LEVELING">
                                            <router-link
                                                    :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">

                                                <div class="pro-list2 border-bottom"
                                                     v-if="item.unreadNum!=null&&item.unreadNum!=0">
                                <span class="buyer-status5">
                                  您有{{item.unreadNum}}条新信息
                                </span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div>

                                                <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              代练中</span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div>
                                            </router-link>

                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.LEVELING_APPLY_CLOSE || (item.orderStatus==2 && item.mainOrderNum)">
                                            <router-link
                                                    :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              申请完成中</span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div>
                                            </router-link>
                                            <div class="pro-list3 f30 fw border-bottom">
                                                <div class="caozuo fw f30">
                                                    <a @click="finishStoreOrder(item.id)" class="dakuan">确认完成，打款</a>
                                                    <!-- <router-link :to="{name:'DlreFund',query:{orderId:item.id}}"
                                                                 class="dakuan-cancel">申请退款
                                                    </router-link> -->
                                                    <a @click="goRefund(item.id,item.totalAmount)" class="dakuan-cancel">申请退款</a>
                                                </div>
                                            </div>

                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.COMPLAIN">

                                            <router-link
                                                    :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom"><span class="buyer-status5">
                        人工介入</span><span class="buyer-chat">聊天</span></div>
                                            </router-link>

                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.REFUNDING">

                                            <router-link :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom"><span
                                                        class="buyer-status5">退款中</span><span
                                                        class="buyer-chat">聊天</span></div>
                                            </router-link>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.APPLY_REFUND">

                                            <router-link :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom"><span
                                                        class="buyer-status5">申请退款中</span><span
                                                        class="buyer-chat">聊天</span></div>
                                            </router-link>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.REFUSE_REFUND">

                                            <router-link :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom"><span
                                                        class="buyer-status5">拒绝退款</span><span
                                                        class="buyer-chat">聊天</span></div>
                                            </router-link>

                                            <div class="pro-list3 f30 fw border-bottom">
                                                <div class="caozuo fw f30">
                                                    <a class="dakuan"  @click="goRefund(item.id,item.totalAmount)">协商退款</a>
                                                        <router-link class="dakuan-cancel"  :to="{name:'DlBuyerAppeal',query:{orderNum:item.id,type:4}}">人工介入</router-link>
                                                </div>
                                            </div>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.FINISH">

                                            <div class="pro-list2 border-bottom"><span class="buyer-status5">交易成功</span>
                                            </div>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.REFUND">

                                            <div class="pro-list2 border-bottom"><span class="buyer-status5">已退款</span>
                                            </div>

                                        </div>


                                    </div>
                                    <div v-else>
                                        <div v-if="item.orderType==5">
                                            <div v-if="item.orderStatus==2">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:1,orderType:item.orderType}}">

                                                    <div class="pro-list2 border-bottom"
                                                         v-if="item.message!=null&&item.message!=0">
                                <span class="buyer-status5">
                                  您有{{item.message}}条新信息
                                </span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>

                                                    <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              陪练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>

                                            </div>
                                            <div v-else-if="item.orderStatus==3 || (item.orderStatus==2 && item.mainOrderNum)">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                    <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              陪练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>

                                                </router-link>
                                                <div class="pro-list2b border-bottom">
                                                    <div class="caozuo fw f30">
                                                        <a href="javascript:"
                                                           @click="confirm(item)"
                                                           class="ared">确认完成，给大神打款</a>
                                                        <router-link
                                                                :to="{name:'DlBuyerAppeal',query:{orderNum:item.orderNum || item.mainOrderNum,type:1,mainOrderNum:item.mainOrderNum ? true :false}}"
                                                                class="awhite">我要申诉
                                                        </router-link>
                                                    </div>
                                                </div>
                                            </div>
                                            <div v-else>

                                                <a href="javascript:">
                                                    <div class="pro-list2 border-bottom">
                          <span class="buyer-status-pl"><em class="pjtitle">您的评价</em>
                          <span v-if="item.rateScore==null||item.rateScore==undefined"
                                style="font-color:red;">未评价</span>
                          <span v-else style="font-color:red;">
                              <em v-for="(list,index) in listMsg"
                                  :class="{pjred:index<item.rateScore?true:false,pjgray:index==item.rateScore?true:false,pjgray:index>item.rateScore?true:false}"></em>
                          </span>

                          </span>
                                                        <span class="buyer-chats">聊天</span>
                                                    </div>
                                                </a>

                                            </div>

                                        </div>
                                        <div v-else>
                                            <div v-if="item.orderStatus==2">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum ? item.orderNum : item.mainOrderNum,type:item.orderType || item.mainOrderNum?1:3,mainOrderNum:item.mainOrderNum ? true : false}}">

                                                    <div class="pro-list2 border-bottom"
                                                         v-if="item.unreadNum!=null&&item.unreadNum!=0">
                                <span class="buyer-status5">
                                  您有{{item.unreadNum}}条新信息
                                </span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>

                                                    <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              代练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>
                                            </div>
                                            <div v-else-if="item.orderStatus==3">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum ? item.orderNum : item.mainOrderNum,type:item.orderType || item.mainOrderNum?1:3,mainOrderNum:item.mainOrderNum ? true : false}}">
                                                    <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              代练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>
                                                <div class="pro-list2b border-bottom">
                                                    <div class="caozuo fw f30">
                                                        <a href="javascript:"
                                                           @click="confirm(item)"
                                                           class="ared">确认完成，给大神打款</a>
                                                        <router-link
                                                                :to="{name:'DlBuyerAppeal',query:{orderNum:item.orderNum || item.mainOrderNum,type:1,mainOrderNum:item.mainOrderNum ? true :false}}"
                                                                class="awhite">我要申诉
                                                        </router-link>
                                                    </div>
                                                </div>
                                            </div>
                                            <div v-else>

                                                <a href="javascript:">
                                                    <div class="pro-list2 border-bottom">
                          <span class="buyer-status-pl"><em class="pjtitle">您的评价</em>
                          <span v-if="item.rateScore==null||item.rateScore==undefined"
                                style="font-color:red;">未评价</span>
                          <span v-else style="font-color:red;">
                              <em v-for="(list,index) in listMsg"
                                  :class="{pjred:index<item.rateScore?true:false,pjgray:index==item.rateScore?true:false,pjgray:index>item.rateScore?true:false}"></em>
                          </span>

                          </span>
                                                        <span class="buyer-chats">聊天</span>
                                                    </div>
                                                </a>
                                            </div>

                                        </div>
                                    </div>


                                </div>

                            </div>
                            <!--已完成订单-->
                            <div v-else-if="$route.params.state=='complete'">
                                <div v-for="item in Dashoulist" class="pro-col border-bottom2">
                                    <div><a class="shareopen">
                                        <div class="pro-list border-top border-top">
                                            <div class="pro-pic">
                                                <img :src="item.orderImg || defaultImg">
                                                <div :class="item.orderType==4 || item.mainOrderNum?'pro-cata4':(item.orderType==5?'pro-cata5':'pro-cata2')">
                                                    {{item.orderType == 4 || item.mainOrderNum ? '代' :(item.orderType == 5? '陪':'店')}}
                                                </div>
                                            </div>
                                            <div class="pro-title">
                                                <p class="catagory">
                                                    {{item.gameName}}/{{item.regionName}}/{{item.serverName}}</p>
                                                    <p class="title" v-if="item.mainOrderNum"> {{item.levelingCombo}}</p>
                                                    <p class="title" style="white-space: nowrap;text-overflow: ellipsis; overflow: hidden;" v-else-if="item.storeOrder">
                                                        {{item.levelingCombo}}
                                                    </p>
                                                    <p class="title" v-else-if="item.orderType == 4 && item.mainOrderNum"> {{item.levelingCombo}}</p>
                                                <p class="title" style="white-space: nowrap;text-overflow: ellipsis; overflow: hidden;" v-else-if='item.orderType == 4'>
                                                    {{item.comboType == 'elevateRank' ? '升段位' : (item.comboType ==
                                                    'elevateGrade' ? '升等级' : '')}} {{item.currentLevel}}-{{item.targetLevel}} {{item.levelComboDay}}天完成</p>
                                                    <p class="title" style="white-space: nowrap;text-overflow: ellipsis; overflow: hidden;" v-else>
                                                        {{item.roleName}} {{item.playerLevel}} 陪练{{item.completeSparringSessions}}场
                                                    </p>
                                                <p class="price">
                                                    ￥{{item.totalAmount}}
                                                </p>
                                            </div>
                                        </div>
                                    </a>
                                    </div>
                                    <div v-if="item.storeOrder">
                                        <div v-if="item.orderStatus==storeOrderStatus.WAIT_PAID">
                                            <div class="pro-list2 border-bottom"><span class="buyer-status5">待付款</span>
                                                <em class="buyer-btn-zf">
                                                    <a @click="nextOrder(item.id)">去付款</a>
                                                </em>
                                            </div>
                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.LEVELING">
                                            <router-link
                                                    :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">

                                                <div class="pro-list2 border-bottom"
                                                     v-if="item.unreadNum!=null&&item.unreadNum!=0">
                                <span class="buyer-status5">
                                  您有{{item.unreadNum}}条新信息
                                </span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div>

                                                <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              代练中</span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div>
                                            </router-link>

                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.LEVELING_APPLY_CLOSE">
                                            <router-link
                                                    :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              申请完成中</span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div>
                                            </router-link>
                                            <div class="pro-list3 f30 fw border-bottom">
                                                <div class="caozuo fw f30">
                                                    <a href="javascript:" @click="finishStoreOrder(item.id)"
                                                       class="dakuan">确认完成，打款</a>
                                                    <!-- <router-link :to="{name:'DlreFund',query:{orderId:item.id}}"
                                                                 class="dakuan-cancel">申请退款
                                                    </router-link> -->
                                                    <a @click="goRefund(item.id,item.totalAmount)" class="dakuan-cancel">申请退款</a>
                                                </div>
                                            </div>

                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.COMPLAIN">

                                            <router-link
                                                    :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                <div class="pro-list2 border-bottom"><span class="buyer-status5">
                        人工介入</span><span class="buyer-chat">聊天</span></div>
                                            </router-link>

                                        </div>
                                        <div v-else-if="item.orderStatus==storeOrderStatus.REFUNDING">

                                            <a href="/store/store-dl-player-transaction.html?orderNum='+orderNum+'">
                                                <div class="pro-list2 border-bottom"><span
                                                        class="buyer-status5">退款中</span><span
                                                        class="buyer-chat">聊天</span></div>
                                            </a>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.APPLY_REFUND">

                                            <a href="/store/store-dl-player-transaction.html?orderNum='+orderNum+'">
                                                <div class="pro-list2 border-bottom"><span
                                                        class="buyer-status5">申请退款中</span><span
                                                        class="buyer-chat">聊天</span></div>
                                            </a>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.REFUSE_REFUND">

                                            <a href="/store/store-dl-player-transaction.html?orderNum='+orderNum+'">
                                                <div class="pro-list2 border-bottom"><span
                                                        class="buyer-status5">拒绝退款</span><span
                                                        class="buyer-chat">聊天</span></div>
                                            </a>

                                            <div class="pro-list3 f30 fw border-bottom">
                                                <div class="caozuo fw f30">
                                                    <!-- <a href="/store/refund.html?orderId='+id+'" class="dakuan">协商退款</a>
                                                    <a href="/store/store-dl-player-appeal.html?id='+id+'"
                                                        class="dakuan-cancel">人工介入</a> -->
                                                        <a class="dakuan"  @click="goRefund(item.id,item.totalAmount)">协商退款</a>
                                                        <router-link class="dakuan-cancel"  :to="{name:'DlBuyerAppeal',query:{orderNum:item.id,type:4}}">人工介入</router-link>
                                                        </div>
                                            </div>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.FINISH">

                                            <div class="pro-list2 border-bottom"><span class="buyer-status5">交易成功</span>
                                            </div>

                                        </div>

                                        <div v-else-if="item.orderStatus==storeOrderStatus.REFUND">

                                            <div class="pro-list2 border-bottom"><span class="buyer-status5">已退款</span>
                                            </div>

                                        </div>


                                    </div>
                                    <div v-else>
                                        <div v-if="item.orderType==5">
                                            <div v-if="item.orderStatus==2">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">

                                                    <div class="pro-list2 border-bottom"
                                                         v-if="item.unreadNum!=null&&item.unreadNum!=0">
                                <span class="buyer-status5">
                                  您有{{item.unreadNum}}条新信息
                                </span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>

                                                    <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              陪练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>
                                                <div class="pro-list2b border-bottom">
                                                    <div class="caozuo fw f30">
                                                        <a class="ared" @click="confirm(item)">申请完成</a>
                                                        <router-link
                                                                :to="{name:'DlBuyerAppeal',query:{orderNum:item.orderNum || item.mainOrderNum,type:1,mainOrderNum:item.mainOrderNum ? true :false}}"
                                                                class="awhite">
                                                            我要申诉
                                                        </router-link>
                                                    </div>

                                                </div>
                                            </div>
                                            <div v-else-if="item.orderStatus==3">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                    <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              陪练中,已申请完成</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>
                                            </div>
                                            <div v-else>

                                                <!-- <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              陪练完成</span>
                                                    <span class="buyer-chat">聊天</span>
                                                </div> -->
                                                  <a>
                                                    <div class="pro-list2 border-bottom">
                          <span class="buyer-status-pl"><em class="pjtitle">您的评价</em>
                          <span v-if="item.rateScore==null||item.rateScore==undefined"
                                style="font-color:red;">未评价</span>
                          <span v-else style="font-color:red;">
                              <em v-for="(list,index) in listMsg"
                                  :class="{pjred:index<item.rateScore?true:false,pjgray:index==item.rateScore?true:false,pjgray:index>item.rateScore?true:false}"></em>
                          </span>

                          </span>
                          <span class="again" @click="gotoDl(item.releaseNum)">再找TA陪练</span>
                                                        
                                                    </div>
                                                </a>
                                            </div>

                                        </div>
                                        <div v-else>
                                            <div v-if="item.orderStatus==2">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">

                                                    <div class="pro-list2 border-bottom"
                                                         v-if="item.unreadNum!=null&&item.unreadNum!=0">
                                <span class="buyer-status5">
                                  您有{{item.unreadNum}}条新信息
                                </span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>

                                                    <div class="pro-list2 border-bottom" v-else>
                            <span class="buyer-status5">
                              代练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>
                                            </div>
                                            <div v-else-if="item.orderStatus==3">
                                                <router-link
                                                        :to="{name:'DlDsTransaction',query:{orderNum:item.orderNum,type:item.orderType?1:3}}">
                                                    <div class="pro-list2 border-bottom">
                            <span class="buyer-status5">
                              代练中</span>
                                                        <span class="buyer-chat">聊天</span>
                                                    </div>
                                                </router-link>
                                                <div class="pro-list2b border-bottom">
                                                    <div class="caozuo fw f30"><a href="javascript:"
                                                                                  @click="confirm(item)"
                                                                                  class="ared">确认完成，给大神打款</a>
                                                        <router-link
                                                                :to="{name:'DlBuyerAppeal',query:{orderNum:item.orderNum || item.mainOrderNum,type:1,mainOrderNum:item.mainOrderNum ? true :false}}"
                                                                class="awhite">我要申诉
                                                        </router-link>
                                                    </div>
                                                </div>
                                            </div>
                                            <div v-else>

                                                <a href="javascript:">
                                                    <div class="pro-list2 border-bottom">
                          <span class="buyer-status-pl"><em class="pjtitle">您的评价</em>
                          <span v-if="item.rateScore==null||item.rateScore==undefined"
                                style="font-color:red;">未评价</span>
                          <span v-else style="font-color:red;">
                              <em v-for="(list,index) in listMsg"
                                  :class="{pjred:index<item.rateScore?true:false,pjgray:index==item.rateScore?true:false,pjgray:index>item.rateScore?true:false}"></em>
                          </span>

                          </span>
                                                        <span class="buyer-chats">聊天</span>
                                                    </div>
                                                </a>
                                            </div>

                                        </div>
                                    </div>


                                </div>
                            </div>

                        </mt-loadmore>
                    </div>
                    <!-- 我买到的商品 -->
                    <div class="tab-panel border-top2 " id="tab-class02">

                    </div>
                    <div class="tab-panel border-top2 " id="tab-class03">

                    </div>


                </div>

            </div>

            <DlDaCount v-if="showDlCount" :orderNumCount="orderNumCount" :orderNumRole="orderNumRole"
                       :orderTypeCount="orderTypeCount"></DlDaCount>


            <div id="kf2" class="kf2" @click="goToServe(2248700294)">
                <a href="javascript:"><img src="~images/kf2.png" width="100%"></a>
            </div>
            <!--修改信息-->
            <transition name="fadeUp">
                <div class="change" v-if="showChange">
                    <div class="operation">
                        <!--<a href="member-dl-edit.html?releaseNum=MDL170629000000001&amp;gameAccount=21214&amp;roleName=54555&amp;bullyDeposit=0.1"
                           id="dlEdit">-->
                        <router-link :to="{ name: 'DlEdit', query: { releaseNum: releaseNum }}">
                            修改帐号信息和押金
                        </router-link>
                        <!-- </a>-->
                        <a href="javascript:" @click="deleted">删除</a>
                    </div>
                    <div class="upload-cancel">
                        <a @click="cancel">取消</a>
                    </div>
                </div>
            </transition>
        </div>
    </div>
</template>
<script>
  import {MessageBox} from 'mint-ui';
  import DlDaCount from './DlDaCount.vue'
  export default {
    name: 'DlSeller',
    data () {
      return {
        errorImg01:'this.src="' + require('images/default_img.jpg') + '"',
        defaultImg:require('images/default_img.jpg'),
        showDlCount: false,
        orderNumCount: 'MODL170704000000001',
        orderNumRole: '赵岩',
        orderTypeCount: '',
        listMsg: [0, 1, 2, 3, 4, 5],
        storeOrderStatus: {
          WAIT_PAID: 1,
          LEVELING: 2,
          LEVELING_APPLY_CLOSE: 3,
          FINISH: 4,
          COMPLAIN: 5,
          CANCELED: 6,
          REFUNDING: 7,
          REFUND: 8,
          APPLY_REFUND: 10,
          REFUSE_REFUND: 11
        },
        Dashoulist: [],
        hideOrder: false,
        kaiguan1: false,
        kaiguan2: false,
        kaiguan3: false,
        showCoins: false,
        busy: false,
        allLoaded: false,
        pageSize: 30,
        start: 0,
        bottomShow: false,
        postData: {},
        msg: "",
        menus: {
          list: {
            publish: {
              state: 'publish',
              name: '我发布的',
            },
            process: {
              state: 'process',
              name: '代练中的',
            },
            complete: {
              state: 'complete',
              name: '已完成的',
            },

          },
          checked: "publish"
        },
        showChange: false,
        releaseNum: '',

      }
    },
    components: {
      DlDaCount,
    },

    methods: {
     /* getWzryList(params){
        return this.$http.get(this.$CONSTANTS.APIdl+'playerOrder/list',{params:params})
      },*/
      nextOrder(orderId){
        this.$router.push(
          {
            name: 'DlStoreOrderPay', query: {
            'orderId': orderId,
          }
          }
        )
      },
      finishStoreOrder(id){
        this.msg = '是否确定完成?'
        this.$messagebox({
          message: this.msg,
          showCancelButton: true,
          confirmButtonClass: "dlMessageboxConfrim",
          cancelButtonClass: "dlMessageboxCancel",
        }).then(action => {
          console.log(action)
          if (action == "confirm") {
            this.$http.get(this.$CONSTANTS.APIStore + 'storeOrder/finish', {
              params: {
                id: id
              }
            }).then((res) => {
              console.log(res);
              //this.changeMenu(this.$route.params.state);
              if (res.body.responseStatus.code == "00") {
                this.changeMenu(this.$route.params.state);
              }

            }, (res) => {
              console.log(res)
            });
          } else {
            return false
          }
        });
      },
      confirm(item){
        if (item.orderType == 5) {
          this.orderTypeCount = 5
          this.msg = "共陪练" + item.realCompleteSparringSessions + "场，需支付" + item.trainingFee * item.realCompleteSparringSessions + "元陪练费，是否确认打款？"
        } else {
          this.orderTypeCount = 4
          this.msg = '是否确定完成?'
        }


        this.$messagebox({
          message: this.msg,
          showCancelButton: true,
          confirmButtonClass: "dlMessageboxConfrim",
          cancelButtonClass: "dlMessageboxCancel",
        }).then(action => {
          console.log(action)
          if (action == "confirm") {
            if(!item.mainOrderNum){
              this.postData.levelingOrderId = item.orderNum;
              this.$http.post(this.$CONSTANTS.APIdl + 'payment/playerconfirmpay', this.postData).then((res) => {
                console.log(res);
                //this.changeMenu(this.$route.params.state);
                if (res.body.responseStatus.code == "00") {
                  this.showDlCount = true;
                  this.orderNumCount = orderNum;
                  this.orderNumRole = orderNumRole
                }

              }, (res) => {
                console.log(res)
              });
            }else{
              this.postData.orderNo = item.mainOrderNum;
              this.$http.post(this.$CONSTANTS.APIdl+'levelingmainorder/confirm',this.postData).then(res=>{
                if(res.body.responseStatus.code=='00'){
                  this.$router.push(
                    {name: 'DlSeller',params:{state:'complete'}}
                  )
                }else{
                  this.$messagebox.alert(res.body.responseStatus.message)
                }
              },res=>{

              })
            }
          } else {
            return false
          }
        });
      },
      aredBox(){
        MessageBox.confirm("确定", "取消");
      },
      BackHome(){
        location.href = "/dl/dl-center.html"
      },
      goToServe(qq){

        if (/baidu/i.test(navigator.userAgent.toLowerCase())) {
          alert('"联系客服"暂不支持当前浏览器，建议使用QQ浏览器、UC浏览器')
        } else {
          location.href = 'mqqwpa://im/chat?chat_type=wpa&uin=' + qq + '&version=1&src_type=web&web_src=oicqzone.com'
        }
      },

      async loadMore() {
        var self = this;
        self.busy = true;
        this.start = this.start + 1;
        if (this.menus.checked == "publish") {
          this.bottomShow = true;
          this.hideOrder = false;
          this.kaiguan1 = true;
          this.kaiguan2 = false;
          this.kaiguan3 = false;
          this.$http.post(this.$CONSTANTS.APIdl + "leveling/getMyLevelingList", {
            levelingStatus: '1',
            pageIndex: this.start,
            pageSize: this.pageSize,
          }).then((res) => {
            console.log(res)
            if (this.kaiguan1) {
              this.showCoins = false
              this.hideOrder = false
              console.log(res.body.levelingEOList)
              this.hideOrder = false
              if (res.body.levelingEOList == undefined) {
                this.hideOrder = true
                this.Dashoulist = []
              }
              if (res.body.levelingEOList.length == 0 && this.start == 1) {
                this.hideOrder = true
                this.Dashoulist = []
              }
              else {

                res.body.levelingEOList.forEach(
                  (item, index) => {
                    console.log(item)
                    this.Dashoulist.push(item);
                  }
                )

                if (res.body.levelingEOList.length == this.pageSize) {
                  this.busy = false;
                }
              }
            }


          })
        }
        else if (this.menus.checked == "process") {
          this.kaiguan1 = false;
          this.kaiguan2 = true;
          this.kaiguan3 = false;
          this.hideOrder = false
          await this.$http.get(this.$CONSTANTS.APIdl + "playerOrder/list", {
            params: {
              status: 2,
              pageIndex: this.start,
              pageSize: this.pageSize
            }
          }).then((res) => {
            if (this.kaiguan2) {
              this.showCoins = false
              console.log(res.body.data)
              this.hideOrder = false
              if (res.body.data == undefined) {
                this.hideOrder = true
                this.Dashoulist = []
              } else {
                res.body.data.forEach(
                  (item, index) => {
                    console.log(item)
                    this.Dashoulist.push(item);
                  }
                )

                if (res.body.data.length == this.pageSize) {
                  this.busy = false;
                }


              }
            }


          })
         /* let params={
            pageIndex:this.start,
            pageSize:20,
            status:2
          }
          if(this.switchTrue){
            await this.getWzryList(params).then(res=>{
              if(res.body.responseStatus.code=='00'){
                if(res.body.data){
                  if(res.body.data.length<20)
                    this.switchTrue=false
                  res.body.data.forEach(item=>{
                    this.Dashoulist.unshift(item)
                  })
                }
              }else{
                this.$messagebox.alert(res.body.responseStatus.message)
              }
            })
          }*/
        }
        else if (this.menus.checked == "complete") {
          this.hideOrder = false
          this.kaiguan1 = false;
          this.kaiguan2 = false;
          this.kaiguan3 = true;
          this.$http.get(this.$CONSTANTS.APIdl + "playerOrder/list", {
            params: {
              status: 3,
              pageIndex: this.start,
              pageSize: this.pageSize
            }
          }).then((res) => {
            if (this.kaiguan3) {
              this.showCoins = false
              console.log(res.body.data)
              this.hideOrder = false
              if (res.body.data == undefined) {
                this.hideOrder = true
                this.Dashoulist = []
              } else {
                res.body.data.forEach(
                  (item, index) => {
                    console.log(item)
                    this.Dashoulist.push(item);
                  }
                )

                if (res.body.data.length == this.pageSize) {
                  this.busy = false;
                }
              }
            }


          })
        }

      },
      changeMenu(key){
        this.showChange = false;
        this.bottomShow = false
        this.Dashoulist = [];
        this.menus.checked = key;
        this.showCoins = true;
        this.pageSize = 30,
          this.start = 0,
          this.loadMore()
      },
      changeMsg(item){
        this.showChange = !this.showChange;
        this.releaseNum = item.releaseNum;
      },
      cancel(){
        this.showChange = false;
      },
      deleted(){
        this.showChange = false;
        console.log(this.releaseNum);
        this.$messagebox({
          message: '确定删除此发布单?',
          showCancelButton: true,
          confirmButtonClass: "dlMessageboxConfrim",
          cancelButtonClass: "dlMessageboxCancel",
        }).then(action => {
          if (action == "confirm") {
            this.$http.post(this.$CONSTANTS.APIdl + 'leveling/deleteLeveling', {releaseNum: this.releaseNum}).then((res) => {
              if (res.body.responseStatus.code == "00") {
                location.reload();
              } else {
                this.$messagebox.alert(res.body.responseStatus.message);
              }
            }, (res) => {
              console.log(res)
            });
          } else {
            return false
          }
        });
      },
      gotoDl(item){
    location.href='/pl/pl-details.html?releaseNum='+item
},
    goRefund(id,price){
        if(this.$isLocalStorageSupported){
            localStorage.setItem('refund',price)
        }
        this.$router.push({name:'DlreFund',query:{orderId:id}})
    }
    },

    mounted(){
      this.changeMenu(this.$route.params.state);
      var self = this;
      self.$bus.emit('headerText', '我是玩家');
      self.$bus.emit('isShowRightHome', true);
      //点击back直接返回个人中心，组件销毁记得改成false
      self.$bus.emit('userType', true);
      self.$bus.emit('isBack', false);
    },
    destroyed(){
      var self = this;
      self.$bus.emit('headerText', '');
      self.$bus.emit('isShowRightHome', false);
      self.$bus.emit('userType', false);
      self.$bus.emit('isBack', true);
    }
  }


</script>
<style src="css/dlAll/dl-cxy.css"></style>
<style scoped>
    .dlIndex {
        margin-top: .96rem;
    }

    #coins_id {
        background: #fff !important;
        line-height: 50px !important;
        font-size: 12px !important;
        width: 100% !important;
        text-align: center !important;
    }

    .fadeUp-enter-active {
        animation: fadeInUp 0.5s;
        -webkit-animation: fadeInUp 0.5s;
    }

    .fadeUp-leave-active {
        animation: fadeOutDown 0.5s;
        -webkit-animation: fadeOutDown 0.5s;
    }
</style>
<style>
    .dlMessageboxConfrim {
        order: 1;
    }

    .dlMessageboxCancel {
        order: 2;
        border-left: 1px solid #ddd !important;
    }

    .member-tab .pro-list2 .buyer-status-pl em.pjred {
        display: inline-block;
        float: left;
        width: .4065rem;
        height: 0.85rem;
        background: url(~images/redwjx.png) center center no-repeat;
        margin: 0 .05rem;
        background-size: .4065rem;
    }

    .member-tab .pro-list2 .buyer-status-pl em.pjgray {
        display: inline-block;
        float: left;
        width: .4065rem;
        height: 0.85rem;
        background: url(~images/graywjx.png) center center no-repeat;
        margin: 0 .05rem;
        background-size: .4065rem;
    }

    .member-tab .pro-list2 span em {
        color: #f75e46;
    }
    .member-tab .pro-list2 .again {
    text-align: center;
    padding: 0 .384rem;
    color: #fff;
    line-height: .816rem;
    background: #f86d59;
    display: inline-block;
    float: right;
    margin: .15rem 0;
    font-size: .3rem;
    vertical-align: middle;
}
</style>